<?php
/**
 * Created by PhpStorm.
 * User: fengsen
 * Date: 16-7-14
 * Time: 下午12:57
 */
//各部分测试功能所需的类文件
//require_once ('clSqlOperation.php');
//require_once ('clInReg.php');
//require_once ('clMyInfo.php');
//require_once ('clSet.php');
//require_once ("clJson.php");
//require_once ("clFeedBack.php");
//require_once ('clRolling.php');

//测试插入范例
//$data = array(
//    'user_name' => 'tqu',
//    'user_passwd' => '111'
//);
//$data = array(
//    'user_name' => array('qwe','wer'),
//    'user_passwd' => array('111','222')
//);
//$test = new clSqlOperation($data,"user_info",null,null);
//$result = $test->fnInsert();
//echo $result;

//测试更新范例
//$data = array(
//    'user_name' => 'qqq',
//    'user_passwd' => '123'
//);
//$test = new clSqlOperation($data,"user_info","user_passwd = '111'",null);
//$result = $test->fnUpdate();
//echo $result;

//测试删除范例
//$test = new clSqlOperation(null,"user_info","user_name = 'rrr'",null);
//$result = $test->fnDelete();
//echo $result;

//测试从数据库获取一条记录
//$test = new clSqlOperation("user_id,user_name","user_info","user_passwd = '222'",null);
//$result = $test->fnGetOne();
//print_r($result);

//从数据库获取多条记录
//$test = new clSqlOperation("user_id,user_name","user_info","user_passwd = '111'",null);
//$result = $test->fnGetAll();
//print_r($result);

//测试登录功能
//$data=array(
//    'user_name' => 'qwe',
//    'user_passwd' => '111',
//    'user_phone' => '15851856958'
//);
//$test = new clInReg(json_encode($data,JSON_UNESCAPED_UNICODE));
//$result = $test->fnCheck();
//echo $result;

//测试注册功能
//$data=array(
//    'user_name' => 'qwe',
//    'user_passwd' => '111',
//    'user_phone' => '15851856958'
//);
//$test = new clInReg(json_encode($data,JSON_UNESCAPED_UNICODE));
//$result = $test->fnCheck();
//echo $result;

//测试修改密码功能
//$data=array(
//    'user_name' => 'qwe',
//    'user_passwd' => '111',
//    'user_new_passwd' => '15851856958'
//);
//$test = new clSet(json_encode($data,JSON_UNESCAPED_UNICODE));
//$result = $test->fnEditPw();
//echo $result;

//测式获得个人信息
//$perInfo = new clMyInfo('{"user_id":1}');
//print_r($perInfo->fnGetInfo());

//测试反馈信息
//$str = '{"fb_user_id":111,"fb_user_phone":"18999442233","fb_time":"2015-09-10","fb_content":"aaaaaaa"}';
//$result = new clFeedBack($str);
// echo $result->fnSaveFeedBack();

//测试轮播功能
//$data=array(
//    'ad_num' => '3'
//);
//$test = new clRolling(json_encode($data,JSON_UNESCAPED_UNICODE));
//$result = $test->fnGetPic();
//print_r($result);